package com.example.mapper;

import com.example.entity.Seat;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SeatMapper {
    List<Seat> selectAll(Seat seat);

    void insert(Seat seat);


    void updateById(Seat seat);

    @Delete("delete from `seat` where id=#{id}")
    void deleteById(Integer id);


    @Select("select * from seat where id=#{id}")
    Seat selectById(Integer id);

    @Update("update seat set status='未选',user_name=null where id=#{setId}")
    void cancelById(Integer setId);
}
